package com.itxx.date.newDateDemo;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZonedDateTime;

public class NewDemo1 {
    public static void main(String[] args) {
        //localDate
        //localTime
        //localDateTime
        //ZonedDateTime
        //ststic now()创建当前时间对象,用于返回本类的实例对象
        //localDate  年月日
        System.out.println(LocalDate.now());
        //localTime   时分秒
        System.out.println(LocalTime.now());
        //localDateTime  年月日时分秒
        System.out.println(LocalDateTime.now());
        //ZonedDateTime 时区 年月日时分秒
        ZonedDateTime zonedDateTime = ZonedDateTime.now();
        System.out.println(zonedDateTime);

    }
}
